package com.cm.caseManagement.pojo.entity;
import com.cm.caseManagement.annotation.Excel;
import com.cm.caseManagement.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 附件对象 cm_sys_attachment
 *
 * @author ruoyi
 * @date 2025-10-05
 */
public class CmSysAttachment extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 外部唯一id */
    @Excel(name = "外部唯一id")
    private String publicId;

    /** 原始文件名 */
    @Excel(name = "原始文件名")
    private String originalName;

    /** 存储文件名（系统生成） */
    @Excel(name = "存储文件名", readConverterExp = "系=统生成")
    private String storageName;

    /** 文件存储路径 */
    @Excel(name = "文件存储路径")
    private String filePath;

    /** 文件大小（字节） */
    @Excel(name = "文件大小", readConverterExp = "字=节")
    private Long fileSize;

    /** 文件MIME类型 */
    @Excel(name = "文件MIME类型")
    private String fileType;

    /** 业务记录ID */
    @Excel(name = "业务记录ID")
    private String bizId;

    /** 业务类型 */
    @Excel(name = "业务类型")
    private String bizType;

    /** 上传人ID */
    @Excel(name = "上传人ID")
    private Long uploaderId;

    /** 上传时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "上传时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date uploadTime;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setPublicId(String publicId)
    {
        this.publicId = publicId;
    }

    public String getPublicId()
    {
        return publicId;
    }

    public void setOriginalName(String originalName)
    {
        this.originalName = originalName;
    }

    public String getOriginalName()
    {
        return originalName;
    }

    public void setStorageName(String storageName)
    {
        this.storageName = storageName;
    }

    public String getStorageName()
    {
        return storageName;
    }

    public void setFilePath(String filePath)
    {
        this.filePath = filePath;
    }

    public String getFilePath()
    {
        return filePath;
    }

    public void setFileSize(Long fileSize)
    {
        this.fileSize = fileSize;
    }

    public Long getFileSize()
    {
        return fileSize;
    }

    public void setFileType(String fileType)
    {
        this.fileType = fileType;
    }

    public String getFileType()
    {
        return fileType;
    }

    public void setBizId(String bizId)
    {
        this.bizId = bizId;
    }

    public String getBizId()
    {
        return bizId;
    }

    public void setBizType(String bizType)
    {
        this.bizType = bizType;
    }

    public String getBizType()
    {
        return bizType;
    }

    public void setUploaderId(Long uploaderId)
    {
        this.uploaderId = uploaderId;
    }

    public Long getUploaderId()
    {
        return uploaderId;
    }

    public void setUploadTime(Date uploadTime)
    {
        this.uploadTime = uploadTime;
    }

    public Date getUploadTime()
    {
        return uploadTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("publicId", getPublicId())
            .append("originalName", getOriginalName())
            .append("storageName", getStorageName())
            .append("filePath", getFilePath())
            .append("fileSize", getFileSize())
            .append("fileType", getFileType())
            .append("bizId", getBizId())
            .append("bizType", getBizType())
            .append("uploaderId", getUploaderId())
            .append("uploadTime", getUploadTime())
            .toString();
    }
}
